package com.jsj.service;


import com.jsj.dao.StudentDao;
import com.jsj.domain.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentService {
    private StudentDao studentDao;

    @Autowired
    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }

    public Student queryByUserName(String username) {
        return studentDao.queryByUserName(username);
    }

    public List<Student> queryByClass(int classId) {
        return studentDao.queryByClass(classId);
    }
}
